import {
    asyncRouterMap,
    constantRouterMap
} from '@/router'

/**
 * 通过meta.role判断是否与当前用户权限匹配
 * @param roles
 * @param route
 */

const loginform = {
    state: {
        routers: [],
        addRouters: [],
        mobile: '',
        password: '',
        passwordCom: '',
        passwordComfirm: '',
        sms_code: '',
        sms_codef: '',
        username: '',
        recommend: ''
    },
    mutations: {
        updateMobile(state, mobile) {
            state.mobile = mobile
        },
        updatePassword(state, password) {
            state.password = password
        },
        updatePasswordCom(state, passwordCom) {
            state.passwordCom = passwordCom
        },
        updatePasswordComfirm(state, passwordComfirm){
            state.passwordComfirm = passwordComfirm
        },
        updateSmsCode(state, sms_code){
            state.sms_code = sms_code
        },
        updateSmsCodef(state, sms_codef){
            state.sms_codef = sms_codef
        },
        updateUsername(state, username) {
            state.username = username
        },
        updateRecommend(state, recommend) {
            state.recommend = recommend
        }
    },
    actions: {

    }
}

export default loginform
